Hi Everybody
Folder f = current
Module m = current
LinkModuleDescriptor linkModDesc
string linkDescName
string modSource
string modTarget
string fullModName
string fullFolderName
string msg =""
fullModName = fullName(m)
fullFolderName = fullName(f)
for linkModDesc in f do {
linkDescName = name(linkModDesc)
//linkDescName = getName(linkModDesc)
modSource = getSourceName(linkModDesc)
modTarget = getTargetName(linkModDesc)
if ((linkDescName == "/MyProject/satisfies") && (modSource == fullModName))
{
print linkDescName "\t"modSource "\t\t\t"modTarget "\n"
//msg removeLinkModuleDescriptor(f,modSource,modTarget)
msg = addLinkModuleDescriptor(f,modSource,modTarget, false, "/MyProject/satisfies_bis","")
}
}
dooors - Tue Mar 01 12:49:03 EST 2011 |
Re: How to Modify a set of Linkset Paring Actually, my guess is that you would want to remove the old one if it exists, and after checking that THEN try to add the new one. The code you have would only modify an existing one, not add it if it doesn't exist. Get into the habit of printing your non-null errors, msg in this case.
|